//
//  LCSongLyricsCell.m
//  自适应TableView布局
//
//  Created by jiukuyinyue on 2017/10/12.
//  Copyright © 2017年 LC. All rights reserved.
//

#import "LCSongLyricsCell.h"

#import "UIView+SDAutoLayout.h"

@implementation LCSongLyricsCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        [self create];
    }
    return self;
}

- (void)create{
    
    UILabel *contentLabel = [UILabel new];
    _contentLabel = contentLabel;
    contentLabel.textColor = [UIColor lightGrayColor];
    contentLabel.font = [UIFont systemFontOfSize:18];
    contentLabel.textAlignment = NSTextAlignmentCenter;
    contentLabel.backgroundColor = [UIColor clearColor];
    
    [self.contentView addSubview:contentLabel];
    
    CGFloat margin = 10;

    self.contentLabel.sd_layout
    .leftSpaceToView(self.contentView, margin)
    .rightSpaceToView(self.contentView, margin)
    .topSpaceToView(self.contentView, margin)
    .autoHeightRatio(0);
    
    [self setupAutoHeightWithBottomView:self.contentLabel bottomMargin:margin];
}
@end
